<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>子标签相对于父标签定位</title>
  <style>
    body{
      margin: 0px;
      padding: 0px;
      font-size: 18px;
      font-weight: bold;
    }
    .father{
      margin: 10px auto;
      width: 300px;
      height: 300px;
      padding: 10px;
      background: #ccc;
      border: 1px solid #000;
      position: relative;
    }
    .child01,.child02,.child03{
      width: 100px;
      height: 50px;
      line-height: 50px;
      background: #ff0;
      border: 1px solid #000;
      margin: 10px 0px;
      text-align: center;
    }
    .child02{
      position: absolute;
      left: 150px;
      top: 100px;
    }
  </style>
</head>
<body>
<div class="father">
  <div class="child01">child01</div>
  <div class="child02">child02</div>
  <div class="child03">child03</div>
</div>
</body>
</html>